package com.stox.ui.swing.widget.wrapper;

import javax.swing.Action;
import javax.swing.Icon;

import com.stox.ui.swing.util.ImageIconLoader;
import com.stox.ui.swing.util.SwingUtil;

public class JButton extends javax.swing.JButton {
	private static final long serialVersionUID = -1785925274137778525L;

	private void initialize(){
		SwingUtil.initializeWidget(this);
		getMargin().set(0, 0, 0, 0);
	}
	
	public JButton(String text, String tooltip, String iconPath, int mnemonic){
		this(text, ImageIconLoader.loadImageIcon(iconPath));
		setMnemonic(mnemonic);
		setToolTipText(tooltip);
	}
	
	public JButton() {
		initialize();
	}

	public JButton(String text) {
		super(text);
		initialize();
	}

	public JButton(Action a) {
		super(a);
		initialize();
	}

	public JButton(Icon icon) {
		super(icon);
		initialize();
	}

	public JButton(String text, Icon icon) {
		super(text, icon);
		initialize();
	}

}
